package verifica.plsdatabase;

import java.util.Collection;
import java.util.Iterator;

import torinoflickrdata.db.FlickrUser;


public class FinalObjects  implements Comparable<FinalObjects> {

	String fl_username;
	double lat;
	double lon;
	String data;
	long fl_ts;
	String pls_username;
	int imsi;
	long celllac;
	long timestamp;
	
	public FinalObjects(String fl_username, double lat, double lon, String data, long f_ts,String pls, int imsi, long cell, long ts ){
		this.fl_username = fl_username;
		this.lat = lat;
		this.lon = lon;
		this.data = data;
		this.fl_ts = f_ts;
		this.pls_username= pls;
		this.imsi = imsi;
		this.celllac = cell;
		this.timestamp = ts;
	}

	public FinalObjects(String fl_username, double lat, double lon, String data,String pls, int imsi, long cell, long ts ){
		this.fl_username = fl_username;
		this.lat = lat;
		this.lon = lon;
		this.data = data;
		this.pls_username= pls;
		this.imsi = imsi;
		this.celllac = cell;
		this.timestamp = ts;
	}
	public String toString(){
	return ""+fl_username+", "+lat+", "+lon+", "+data+", "+pls_username+", "+imsi+", "+celllac+", "+timestamp;
	}
	
	/*public int compareTo(FinalObjects fo){
			
			if (timestamp < fo.timestamp)
				return 1; 
		    if (timestamp > fo.timestamp) 
		    	return -1;
		    return 0;
	} */
	
	
	public int compareTo(FinalObjects fl) {
	if (fl_ts < fl.fl_ts)
		return 1; 
    if (fl_ts > fl.fl_ts) 
    	return -1;
    return 0;
}

	
	public String getFl_username() {
		return fl_username;
	}
	public void setFl_username(String fl_username) {
		this.fl_username = fl_username;
	}
	public double getLat() {
		return lat;
	}
	public void setLat(double lat) {
		this.lat = lat;
	}
	public double getLon() {
		return lon;
	}
	public void setLon(double lon) {
		this.lon = lon;
	}
	public String getData() {
		return data;
	}
	public void setData(String data) {
		this.data = data;
	}
	public String getPls_username() {
		return pls_username;
	}
	public void setPls_username(String pls_username) {
		this.pls_username = pls_username;
	}
	public int getImsi() {
		return imsi;
	}
	public void setImsi(int imsi) {
		this.imsi = imsi;
	}
	public long getCelllac() {
		return celllac;
	}
	public void setCelllac(long celllac) {
		this.celllac = celllac;
	}
	public long getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	
	
}
